<template>
    <div class="echart" ref="mychart" :style="myChartStyle"></div>
</template>

<script>
import * as echarts from "echarts";

export default {
    props:{
    },
data() {
    return {
    myChart: {},
    lineName: [],
    myChartStyle: {marginTop:"20%",marginLeft:"5%",  width: "100%" ,height:"400px "}, //图表样式
    lineData:[
    [
        "Income",
        "Life Expectancy",
        "Population",
        "Country",
        "Year"
    ],
    [
        13902,
        65.1,
        145818121,
        "Russia",
        2001
    ],
    [
        12106,
        72,
        64182694,
        "Turkey",
        2001
    ],
    [
        33282,
        78,
        59080221,
        "United Kingdom",
        2001
    ],
    [
        45978,
        77.1,
        285796198,
        "United States",
        2001
    ],
    [
        36375,
        80.4,
        19514385,
        "Australia",
        2002
    ],
    [
        38270,
        79.7,
        31288572,
        "Canada",
        2002
    ],
    [
        4285,
        72.4,
        1284349938,
        "China",
        2002
    ],
    [
        11715,
        76.6,
        11184540,
        "Cuba",
        2002
    ],
    [
        35834,
        78.5,
        5200632,
        "Finland",
        2002
    ],
    [
        35333,
        79.4,
        60075783,
        "France",
        9.9
    ],
    [
        37458,
        78.5,
        81699829,
        "Germany",
        9.9
    ],
    [
        34252,
        80.5,
        286865,
        "Iceland",
        2002
    ],
    [
        2684,
        61.9,
        1090189358,
        "India",
        2002
    ],
    [
        32248,
        81.7,
        126249509,
        "Japan",
        2002
    ],
    [
        1375,
        63.5,
        23248053,
        "North Korea",
        2002
    ],
    [
        23008,
        77.3,
        46769579,
        "South Korea",
        2002
    ],
    [
        29637,
        79,
        3961695,
        "New Zealand",
        2002
    ],
    [
        60152,
        79.2,
        4537240,
        "Norway",
        2002
    ],
    [
        14964,
        74.6,
        38454823,
        "Poland",
        2002
    ],
    [
        14629,
        64.9,
        145195521,
        "Russia",
        2002
    ],
    [
        12669,
        72.5,
        65125766,
        "Turkey",
        2002
    ],
    [
        33954,
        78.2,
        59301235,
        "United Kingdom",
        2002
    ],
    [
        46367,
        77.2,
        288470847,
        "United States",
        2002
    ],
    [
        37035,
        80.7,
        19735255,
        "Australia",
        2003
    ],
    [
        38621,
        79.9,
        31596593,
        "Canada",
        2003
    ],
    [
        4685,
        72.9,
        1291485488,
        "China",
        2003
    ],
    [
        12123,
        76.8,
        11214837,
        "Cuba",
        2003
    ],
    [
        36461,
        78.6,
        5213800,
        "Finland",
        2003
    ],
    [
        35371,
        79.7,
        60464857,
        "France",
        9.10
    ],
    [
        37167,
        78.8,
        81569481,
        "Germany",
        9.10
    ],
    [
        34938,
        80.8,
        289824,
        "Iceland",
        2003
    ],
    [
        2850,
        62.4,
        1108369577,
        "India",
        2003
    ],
    [
        32721,
        81.8,
        126523884,
        "Japan",
        2003
    ],
    [
        1405,
        69.8,
        23449173,
        "North Korea",
        2003
    ],
    [
        23566,
        77.8,
        47043251,
        "South Korea",
        2003
    ],
    [
        30404,
        79.3,
        4020195,
        "New Zealand",
        2003
    ],
    [
        60351,
        79.5,
        4560947,
        "Norway",
        2003
    ],
    [
        15508,
        74.9,
        38451227,
        "Poland",
        2003
    ],
    [
        15768,
        64.8,
        144583147,
        "Russia",
        2003
    ],
    [
        13151,
        72.9,
        66060121,
        "Turkey",
        2003
    ],
    [
        35250,
        78.5,
        59548421,
        "United Kingdom",
        2003
    ],
    [
        47260,
        77.3,
        291005482,
        "United States",
        2003
    ],
    [
        38130,
        81,
        19985475,
        "Australia",
        2004
    ],
    [
        39436,
        80.1,
        31918582,
        "Canada",
        2004
    ],
    [
        5127,
        73.4,
        1298573031,
        "China",
        2004
    ],
    [
        12791,
        76.9,
        11240680,
        "Cuba",
        2004
    ],
    [
        37783,
        78.6,
        5228842,
        "Finland",
        2004
    ],
    [
        36090,
        80.1,
        60858654,
        "France",
        9.11
    ],
    [
        37614,
        79.1,
        81417791,
        "Germany",
        9.11
    ],
    [
        37482,
        81.1,
        293084,
        "Iceland",
        2004
    ],
    [
        3029,
        62.8,
        1126419321,
        "India",
        2004
    ],
    [
        33483,
        82,
        126773081,
        "Japan",
        2004
    ],
    [
        1410,
        69.9,
        23639296,
        "North Korea",
        2004
    ],
    [
        24628,
        78.3,
        47320454,
        "South Korea",
        2004
    ],
    [
        31098,
        79.5,
        4078779,
        "New Zealand",
        2004
    ],
    [
        62370,
        79.7,
        4589241,
        "Norway",
        2004
    ],
    [
        16314,
        75,
        38454520,
        "Poland",
        2004
    ],
    [
        16967,
        65,
        144043914,
        "Russia",
        2004
    ],
    [
        14187,
        73.4,
        66973561,
        "Turkey",
        2004
    ],
    [
        35910,
        78.8,
        59846226,
        "United Kingdom",
        2004
    ],
    [
        48597,
        77.6,
        293530886,
        "United States",
        2004
    ],
    [
        38840,
        81.2,
        20274282,
        "Australia",
        2005
    ],
    [
        40284,
        80.3,
        32256333,
        "Canada",
        2005
    ],
    [
        5675,
        73.9,
        1305600630,
        "China",
        2005
    ],
    [
        14200,
        77.1,
        11261052,
        "Cuba",
        2005
    ],
    [
        38700,
        78.8,
        5246368,
        "Finland",
        2005
    ],
    [
        36395,
        80.4,
        61241700,
        "France",
        9.12
    ],
    [
        37901,
        79.4,
        81246801,
        "Germany",
        9.12
    ],
    [
        39108,
        81.3,
        296745,
        "Iceland",
        2005
    ],
    [
        3262,
        63.2,
        1144326293,
        "India",
        2005
    ],
    [
        33916,
        82.2,
        126978754,
        "Japan",
        2005
    ],
    [
        1464,
        70.1,
        23813324,
        "North Korea",
        2005
    ],
    [
        25541,
        78.8,
        47605863,
        "South Korea",
        2005
    ],
    [
        31798,
        79.8,
        4134699,
        "New Zealand",
        2005
    ],
    [
        63573,
        80.1,
        4624388,
        "Norway",
        2005
    ],
    [
        16900,
        75,
        38463514,
        "Poland",
        2005
    ],
    [
        18118,
        64.8,
        143622566,
        "Russia",
        2005
    ],
    [
        15176,
        73.8,
        67860617,
        "Turkey",
        2005
    ],
    [
        36665,
        79.1,
        60210012,
        "United Kingdom",
        2005
    ],
    [
        49762,
        77.7,
        296139635,
        "United States",
        2005
    ],
    [
        39416,
        81.4,
        20606228,
        "Australia",
        2006
    ],
    [
        41012,
        80.5,
        32611436,
        "Canada",
        2006
    ],
    [
        6360,
        74.4,
        1312600877,
        "China",
        2006
    ],
    [
        15901,
        77.4,
        11275199,
        "Cuba",
        2006
    ],
    [
        40115,
        79,
        5266600,
        "Finland",
        2006
    ],
    [
        37001,
        80.7,
        61609991,
        "France",
        9.13
    ],
    [
        39352,
        79.7,
        81055904,
        "Germany",
        9.13
    ],
    [
        39818,
        81.5,
        300887,
        "Iceland",
        2006
    ],
    [
        3514,
        63.6,
        1162088305,
        "India",
        2006
    ],
    [
        34468,
        82.3,
        127136576,
        "Japan",
        2006
    ],
    [
        1461,
        70.2,
        23969897,
        "North Korea",
        2006
    ],
    [
        26734,
        79.2,
        47901643,
        "South Korea",
        2006
    ],
    [
        32281,
        80,
        4187584,
        "New Zealand",
        2006
    ],
    [
        64573,
        80.4,
        4667105,
        "Norway",
        2006
    ],
    [
        17959,
        75,
        38478763,
        "Poland",
        2006
    ],
    [
        19660,
        66.1,
        143338407,
        "Russia",
        2006
    ],
    [
        16013,
        74.3,
        68704721,
        "Turkey",
        2006
    ],
    [
        37504,
        79.3,
        60648850,
        "United Kingdom",
        2006
    ],
    [
        50599,
        77.8,
        298860519,
        "United States",
        2006
    ],
    [
        40643,
        81.5,
        20975949,
        "Australia",
        2007
    ],
    [
        41432,
        80.6,
        32982275,
        "Canada",
        2007
    ],
    [
        7225,
        74.9,
        1319625197,
        "China",
        2007
    ],
    [
        17055,
        77.6,
        11284043,
        "Cuba",
        2007
    ],
    [
        42016,
        79.2,
        5289333,
        "Finland",
        2007
    ],
    [
        37641,
        80.9,
        61966193,
        "France",
        9.14
    ],
    [
        40693,
        79.8,
        80854515,
        "Germany",
        9.14
    ],
    [
        42598,
        81.8,
        305415,
        "Iceland",
        2007
    ],
    [
        3806,
        64,
        1179685631,
        "India",
        2007
    ],
    [
        35183,
        82.5,
        127250015,
        "Japan",
        2007
    ],
    [
        1392,
        70.3,
        24111945,
        "North Korea",
        2007
    ],
    [
        28063,
        79.5,
        48205062,
        "South Korea",
        2007
    ],
    [
        32928,
        80.1,
        4238021,
        "New Zealand",
        2007
    ],
    [
        65781,
        80.6,
        4716584,
        "Norway",
        2007
    ],
    [
        19254,
        75.1,
        38500356,
        "Poland",
        2007
    ],
    [
        21374,
        67.2,
        143180249,
        "Russia",
        2007
    ],
    [
        16551,
        74.7,
        69515492,
        "Turkey",
        2007
    ],
    [
        38164,
        79.4,
        61151820,
        "United Kingdom",
        2007
    ],
    [
        51011,
        78.1,
        301655953,
        "United States",
        2007
    ],
    [
        41312,
        81.5,
        21370348,
        "Australia",
        2008
    ],
    [
        41468,
        80.7,
        33363256,
        "Canada",
        2008
    ],
    [
        7880,
        75.1,
        1326690636,
        "China",
        2008
    ],
    [
        17765,
        77.8,
        11290239,
        "Cuba",
        2008
    ],
    [
        42122,
        79.4,
        5314170,
        "Finland",
        2008
    ],
    [
        37505,
        81,
        62309529,
        "France",
        9.14
    ],
    [
        41199,
        80,
        80665906,
        "Germany",
        9.14
    ],
    [
        42294,
        82,
        310033,
        "Iceland",
        2008
    ],
    [
        3901,
        64.4,
        1197070109,
        "India",
        2008
    ],
    [
        34800,
        82.6,
        127317900,
        "Japan",
        2008
    ],
    [
        1427,
        70.6,
        24243829,
        "North Korea",
        2008
    ],
    [
        28650,
        79.7,
        48509842,
        "South Korea",
        2008
    ],
    [
        32122,
        80.2,
        4285380,
        "New Zealand",
        2008
    ],
    [
        65216,
        80.7,
        4771633,
        "Norway",
        2008
    ],
    [
        19996,
        75.3,
        38525752,
        "Poland",
        2008
    ],
    [
        22506,
        67.6,
        143123163,
        "Russia",
        2008
    ],
    [
        16454,
        75.1,
        70344357,
        "Turkey",
        2008
    ],
    [
        37739,
        79.5,
        61689620,
        "United Kingdom",
        2008
    ],
    [
        50384,
        78.2,
        304473143,
        "United States",
        2008
    ],
    [
        41170,
        81.6,
        21770690,
        "Australia",
        2009
    ],
    [
        39884,
        80.9,
        33746559,
        "Canada",
        2009
    ],
    [
        8565,
        75.6,
        1333807063,
        "China",
        2009
    ],
    [
        18035,
        77.9,
        11297442,
        "Cuba",
        2009
    ],
    [
        38455,
        79.7,
        5340485,
        "Finland",
        2009
    ],
    [
        36215,
        81,
        62640901,
        "France",
        9.15
    ],
    [
        38975,
        80,
        80519685,
        "Germany",
        9.15
    ],
    [
        39979,
        82.2,
        314336,
        "Iceland",
        2009
    ],
    [
        4177,
        64.7,
        1214182182,
        "India",
        2009
    ],
    [
        32880,
        82.8,
        127340884,
        "Japan",
        2009
    ],
    [
        1407,
        70.7,
        24371806,
        "North Korea",
        2009
    ],
    [
        28716,
        79.8,
        48807036,
        "South Korea",
        2009
    ],
    [
        31723,
        80.3,
        4329124,
        "New Zealand",
        2009
    ],
    [
        63354,
        80.8,
        4830371,
        "Norway",
        2009
    ],
    [
        20507,
        75.6,
        38551489,
        "Poland",
        2009
    ],
    [
        20739,
        68.3,
        143126660,
        "Russia",
        2009
    ],
    [
        15467,
        75.4,
        71261307,
        "Turkey",
        2009
    ],
    [
        35840,
        79.7,
        62221164,
        "United Kingdom",
        2009
    ],
    [
        48558,
        78.3,
        307231961,
        "United States",
        2009
    ],
    [
        41330,
        81.7,
        22162863,
        "Australia",
        2010
    ],
    [
        40773,
        81.1,
        34126173,
        "Canada",
        2010
    ],
    [
        9430,
        75.9,
        1340968737,
        "China",
        2010
    ],
    [
        18477,
        78,
        11308133,
        "Cuba",
        2010
    ],
    [
        39425,
        80,
        5367693,
        "Finland",
        2010
    ],
    [
        36745,
        81.2,
        62961136,
        "France",
        9.16
    ],
    [
        40632,
        80.2,
        80435307,
        "Germany",
        9.16
    ],
    [
        38809,
        82.5,
        318042,
        "Iceland",
        2010
    ],
    [
        4547,
        65.1,
        1230984504,
        "India",
        2010
    ],
    [
        34404,
        83,
        127319802,
        "Japan",
        2010
    ],
    [
        1393,
        70.8,
        24500506,
        "North Korea",
        2010
    ],
    [
        30440,
        80,
        49090041,
        "South Korea",
        2010
    ],
    [
        31824,
        80.5,
        4369027,
        "New Zealand",
        2010
    ],
    [
        62946,
        80.9,
        4891251,
        "Norway",
        2010
    ],
    [
        21328,
        76.1,
        38574682,
        "Poland",
        2010
    ],
    [
        21664,
        68.7,
        143158099,
        "Russia",
        2010
    ],
    [
        16674,
        75.7,
        72310416,
        "Turkey",
        2010
    ],
    [
        36240,
        80,
        62716684,
        "United Kingdom",
        2010
    ],
    [
        49373,
        78.5,
        309876170,
        "United States",
        2010
    ],
    [
        41706,
        81.8,
        22542371,
        "Australia",
        2011
    ],
    [
        41567,
        81.3,
        34499905,
        "Canada",
        2011
    ],
    [
        10274,
        76.1,
        1348174478,
        "China",
        2011
    ],
    [
        19005,
        78.1,
        11323570,
        "Cuba",
        2011
    ],
    [
        40251,
        80.3,
        5395816,
        "Finland",
        2011
    ],
    [
        37328,
        81.4,
        63268405,
        "France",
        9.17
    ],
    [
        42080,
        80.3,
        80424665,
        "Germany",
        9.17
    ],
    [
        39619,
        82.7,
        321030,
        "Iceland",
        2011
    ],
    [
        4787,
        65.5,
        1247446011,
        "India",
        2011
    ],
    [
        34316,
        82.8,
        127252900,
        "Japan",
        2011
    ],
    [
        1397,
        71,
        24631359,
        "North Korea",
        2011
    ],
    [
        31327,
        80.3,
        49356692,
        "South Korea",
        2011
    ],
    [
        32283,
        80.6,
        4404483,
        "New Zealand",
        2011
    ],
    [
        62737,
        81.1,
        4953945,
        "Norway",
        2011
    ],
    [
        22333,
        76.5,
        38594217,
        "Poland",
        2011
    ],
    [
        22570,
        69.4,
        143211476,
        "Russia",
        2011
    ],
    [
        17908,
        76,
        73517002,
        "Turkey",
        2011
    ],
    [
        36549,
        80.4,
        63164949,
        "United Kingdom",
        2011
    ],
    [
        49781,
        78.7,
        312390368,
        "United States",
        2011
    ],
    [
        42522,
        81.8,
        22911375,
        "Australia",
        2012
    ],
    [
        41865,
        81.4,
        34868151,
        "Canada",
        2012
    ],
    [
        11017,
        76.3,
        1355386952,
        "China",
        2012
    ],
    [
        19586,
        78.2,
        11342631,
        "Cuba",
        2012
    ],
    [
        39489,
        80.5,
        5424644,
        "Finland",
        2012
    ],
    [
        37227,
        81.6,
        63561798,
        "France",
        9.18
    ],
    [
        42959,
        80.5,
        80477952,
        "Germany",
        9.18
    ],
    [
        39925,
        82.8,
        323407,
        "Iceland",
        2012
    ],
    [
        4967,
        65.9,
        1263589639,
        "India",
        2012
    ],
    [
        34988,
        83.2,
        127139821,
        "Japan",
        2012
    ],
    [
        1393,
        71.1,
        24763353,
        "North Korea",
        2012
    ],
    [
        31901,
        80.4,
        49608451,
        "South Korea",
        2012
    ],
    [
        32806,
        80.6,
        4435883,
        "New Zealand",
        2012
    ],
    [
        63620,
        81.3,
        5018367,
        "Norway",
        2012
    ],
    [
        22740,
        76.7,
        38609486,
        "Poland",
        2012
    ],
    [
        23299,
        70.4,
        143287536,
        "Russia",
        2012
    ],
    [
        18057,
        76.2,
        74849187,
        "Turkey",
        2012
    ],
    [
        36535,
        80.8,
        63573766,
        "United Kingdom",
        2012
    ],
    [
        50549,
        78.8,
        314799465,
        "United States",
        2012
    ],
    [
        42840,
        81.8,
        23270465,
        "Australia",
        2013
    ],
    [
        42213,
        81.5,
        35230612,
        "Canada",
        2013
    ],
    [
        11805,
        76.5,
        1362514260,
        "China",
        2013
    ],
    [
        20122,
        78.3,
        11362505,
        "Cuba",
        2013
    ],
    [
        38788,
        80.6,
        5453061,
        "Finland",
        2013
    ],
    [
        37309,
        81.7,
        63844529,
        "France",
        9.19
    ],
    [
        42887,
        80.7,
        80565861,
        "Germany",
        9.19
    ],
    [
        40958,
        82.8,
        325392,
        "Iceland",
        2013
    ],
    [
        5244,
        66.2,
        1279498874,
        "India",
        2013
    ],
    [
        35614,
        83.3,
        126984964,
        "Japan",
        2013
    ],
    [
        1392,
        71.2,
        24895705,
        "North Korea",
        2013
    ],
    [
        32684,
        80.5,
        49846756,
        "South Korea",
        2013
    ],
    [
        33360,
        80.6,
        4465276,
        "New Zealand",
        2013
    ],
    [
        63322,
        81.4,
        5083450,
        "Norway",
        2013
    ],
    [
        23144,
        76.9,
        38618698,
        "Poland",
        2013
    ],
    [
        23561,
        71.3,
        143367341,
        "Russia",
        2013
    ],
    [
        18579,
        76.3,
        76223639,
        "Turkey",
        2013
    ],
    [
        36908,
        81,
        63955654,
        "United Kingdom",
        2013
    ],
    [
        51282,
        78.9,
        317135919,
        "United States",
        2013
    ],
    [
        43219,
        81.8,
        23622353,
        "Australia",
        2014
    ],
    [
        42817,
        81.6,
        35587793,
        "Canada",
        2014
    ],
    [
        12609,
        76.7,
        1369435670,
        "China",
        2014
    ],
    [
        20704,
        78.4,
        11379111,
        "Cuba",
        2014
    ],
    [
        38569,
        80.7,
        5479660,
        "Finland",
        2014
    ],
    [
        37218,
        81.8,
        64121249,
        "France",
        9.20
    ],
    [
        43444,
        80.9,
        80646262,
        "Germany",
        9.20
    ],
    [
        41237,
        82.8,
        327318,
        "Iceland",
        2014
    ],
    [
        5565,
        66.5,
        1295291543,
        "India",
        2014
    ],
    [
        35635,
        83.4,
        126794564,
        "Japan",
        2014
    ],
    [
        1391,
        71.3,
        25026772,
        "North Korea",
        2014
    ],
    [
        33629,
        80.6,
        50074401,
        "South Korea",
        2014
    ],
    [
        33538,
        80.6,
        4495482,
        "New Zealand",
        2014
    ],
    [
        64020,
        81.5,
        5147970,
        "Norway",
        2014
    ],
    [
        23952,
        77.1,
        38619974,
        "Poland",
        2014
    ],
    [
        23293,
        72.21,
        143429435,
        "Russia",
        2014
    ],
    [
        18884,
        76.4,
        77523788,
        "Turkey",
        2014
    ],
    [
        37614,
        81.2,
        64331348,
        "United Kingdom",
        2014
    ],
    [
        52118,
        79,
        319448634,
        "United States",
        2014
    ],
    [
        44056,
        81.8,
        23968973,
        "Australia",
        2015
    ],
    [
        43294,
        81.7,
        35939927,
        "Canada",
        2015
    ],
    [
        13334,
        76.9,
        1376048943,
        "China",
        2015
    ],
    [
        21291,
        78.5,
        11389562,
        "Cuba",
        2015
    ],
    [
        38923,
        80.8,
        5503457,
        "Finland",
        2015
    ],
    [
        37599,
        81.9,
        64395345,
        "France",
        9.21
    ],
    [
        44053,
        81.1,
        80688545,
        "Germany",
        9.21
    ],
    [
        42182,
        82.8,
        329425,
        "Iceland",
        2015
    ],
    [
        5903,
        66.8,
        1311050527,
        "India",
        2015
    ],
    [
        36162,
        83.5,
        126573481,
        "Japan",
        2015
    ],
    [
        1390,
        71.4,
        25155317,
        "North Korea",
        2015
    ],
    [
        34644,
        80.7,
        50293439,
        "South Korea",
        2015
    ],
    [
        34186,
        80.6,
        4528526,
        "New Zealand",
        2015
    ],
    [
        64304,
        81.6,
        5210967,
        "Norway",
        2015
    ],
    [
        24787,
        77.3,
        38611794,
        "Poland",
        2015
    ],
    [
        23038,
        73.13,
        143456918,
        "Russia",
        2015
    ],
    [
        19360,
        76.5,
        78665830,
        "Turkey",
        2015
    ],
    [
        38225,
        81.4,
        64715810,
        "United Kingdom",
        2015
    ],
    [
        53354,
        79.1,
        321773631,
        "United States",
        2015
    ]
    ]
    };
},
mounted() {
    this.initData(); //数据初始化
    this.$nextTick(()=>{
        this.initEcharts();
    })
},
methods: {
    initData() {
    for (let i = 0; i < this.lineData.length; i++) {
        // this.xData[i] = i;
        // this.yData =this.xData[i]*this.xData[i];
        this.lineName[i] = this.lineData[i].name;
    }
    },
    initEcharts() {
    // 饼图
    const  option = {
        dataset: [
        {
            id: 'dataset_raw',
            source: this.lineData
        },
        {
            id: 'dataset_since_1950_of_germany',
            fromDatasetId: 'dataset_raw',
            transform: {
            type: 'filter',
            config: {
                and: [
                { dimension: 'Year', gte: 9 },
                { dimension: 'Country', '=': 'Germany' }
                ]
            }
            }
        },
        {
            id: 'dataset_since_1950_of_france',
            fromDatasetId: 'dataset_raw',
            transform: {
            type: 'filter',
            config: {
                and: [
                { dimension: 'Year', gte: 9 },
                { dimension: 'Country', '=': 'France' }
                ]
            }
            }
        }
        ],
        title: {
        text: '碳排放量-预测与实际'
        },
        dataZoom: [{
				    type: 'slider',
				    show: true,
				    start: 0,//滚动条的起始位置
				    end: 100//滚动条的截止位置（按比例分割你的柱状图x轴长度）
				}],
        tooltip: {
        trigger: 'axis'
        },
        xAxis: {
        type: 'category',
        nameLocation: 'middle'
        },
        yAxis: {
        name: '排放量',
        textStyle:{
            padding:[0,0,0,60]
        }
        },
        grid: {
            left: 50
        },
        series: [
        {
            type: 'bar',
            datasetId: 'dataset_since_1950_of_germany',
            showSymbol: false,
            encode: {
            x: 'Year',
            y: 'Income',
            itemName: 'Year',
            tooltip: ['Income']
            }
        },
        {
            type: 'bar',
            datasetId: 'dataset_since_1950_of_france',
            showSymbol: false,
            encode: {
            x: 'Year',
            y: 'Income',
            itemName: 'Year',
            tooltip: ['Income']
            }
        }
        ]
    };
    console.log(this.seriesData);
    this.myChart = echarts.init(this.$refs.mychart);
    this.myChart.setOption(option);
    //随着屏幕大小调节图表
    window.addEventListener("resize", () => {
        this.myChart.resize();
    });
    }
}
};
</script>

